{% comment %}
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2020 seL4 Project a Series of LF Projects, LLC.
{% endcomment %}
{% comment %}
This file was inspired by the file of the same name in the minima template.
{% endcomment %}

<footer class="site-footer">

  <h2 class="footer-heading">{{ site.title | escape }}</h2>

  <div class="footer-col-wrapper">

    <div class="col-md-2">
      {% include social.html %}
    </div>

    <div class="col-md-8">
      <ul class="list-unstyled">
        <li>
          {{ site.description | escape }}
        </li>
        {% if jekyll.environment == "production" %}
          <li>
            Site last updated: {{ site.data.generated.date }}
          </li>
          <li>
            {%- for member in site.data.generated.timestamps %}
              {%- if page.path == member.page %}
                Page last updated: {{ member.date }}
              {%- endif %}
            {%- endfor %}
          </li>
        {% endif %}
      </ul>
    </div>
    <div class="col-md-2">
{% comment %}
Collection pages set their absolute path variable relative to the site.collections_dir property.
To provide a URL to this page in the GitHub repository, we need to amend the path.
{% endcomment %}
{% capture src_path %}
{% if page.collection %}
{{site.collections_dir}}/{{page.path}}
{% else %}
{{page.path}}
{% endif %}
{% endcapture %}
      <a href="{{site.git_repo | append: '/blob/master/' | append: src_path}}">View page on GitHub</a>
      <br />
      <a href="{{site.git_repo | append: '/edit/master/' | append: src_path}}">Edit page on GitHub</a>
      <br />
      <a href="/sitemap">Sitemap</a>
    </div>

  </div>

</footer>
